package patterns.memento.main;

import patterns.memento.core.Original;
import patterns.memento.core.Storage;

public class Test {
	public static void main(String[] args) {
		Original original = new Original("ran");
		System.out.println(original.getValue());
		Storage storage = new Storage(original.createMemento());
		original.setValue("ranran");
		System.out.println(original.getValue());
		original.restoreMemento(storage.getMemento());
		System.out.println(original.getValue());
	}
}
